#include <stdio.h>
#include <string.h>
#include <stdlib.h>
// 设计一个API，实现打印整型数组的每个元素的数据

void print(int *p, int row, int col)
{
    for (int i = 0; i < row; i++)
    {
        for (int j = 0; j < col; j++)
        {
            printf("%d ", *(p + i * col + j));
        }
        printf("\n");
    }
}

int main()
{
    int arr1[3][5] = {{11, 22, 33, 44, 55},
                      {33, 99, 88, 66, 44},
                      {10, 20, 30, 40, 50}};

    int arr2[2][4] = {{11, 22, 33, 44},
                      {33, 99, 88, 66}};

    int arr3[5] = {10, 20, 30, 40, 50};

    print(*arr1, 3, 5);
    print(*arr2, 2, 4);
    print(arr3, 0, 5);

    return 0;
}